This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
fix: should use copied value of iterator #33
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #33 +/- ##
===========================================
+ Coverage 52.60% 66.49% +13.88%
===========================================
Files 29 28 -1
Lines 1785 1158 -627
===========================================
- Hits 939 770 -169
+ Misses 740 337 -403
+ Partials 106 51 -55
|
iproudhon
reviewed
Nov 29, 2021
iproudhon
approved these changes
Nov 30, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
dudong2
approved these changes
Nov 30, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
9 tasks
iproudhon
pushed a commit
that referenced
this pull request
Dec 2, 2021
* fix: should use copied value of iterator * fix: apply comment
iproudhon
added a commit
that referenced
this pull request
Jan 21, 2022
* fix: should use copied value of iterator (#33) * fix: should use copied value of iterator * fix: apply comment * feat: added Name method * feat: alternative rocksdb implementation * fix: fixed dummy Name() methods feat: added WriteLowPri() * chore: rdb instead of rocksdb for 'rocksdb' because gorocksdb doesn't have low priority write option * chore: removed debug message * fix: added cleveldb & rocksdb build for go test * docs: update CHANGELOG.md * fix: removed unused package * fix: ci test failure * Apply suggestions from code review Co-authored-by: Youngtaek Yoon <noreply@yoon.anonaddy.me> * fix: close upon batch write erroro chore: removed duplicated line, added comments about read / write options Co-authored-by: Woosang Son <woosang.son@linecorp.com> Co-authored-by: Youngtaek Yoon <noreply@yoon.anonaddy.me>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We found the cause of this system crash(Finschia/finschia-sdk#314).
In this PR(#22), it was modified not to copy when getting a value from an iterator, but this code has a problem.
In rocksdb, iterator.value is a memory within db, so we don't know when it will be free. Therefore, it must be copied and used.